<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function khwstr(scores) {
            "use strict"

            for (var i = 0; i < scores.length; i++) {
                if (scores[i] !== scores[scores.length - i - 1]) {
                    return "不是可回文字符的数组"
                }

            }
            return "是可回文字符的数组"

        }
        // 不是可回文字符的数组
        var arr = ["a", "b", "c", "a"]
        var result = khwstr(arr)
        console.log(result)
        // 是可回文字符的数组
        var arr1 = ["a", "b", "c", "b", "a"]
        var result = khwstr(arr1)
        console.log(result)
    </script>
</body>

</html>